/* Copyright (c) 2011 Timothée Lacroix
 * This file is part of HINAPT.
 *
 * HINAPT is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * HINAPT is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with HINAPT.  If not, see <http://www.gnu.org/licenses/>.
 */

/*!
  \file filesystem.hpp
  contient les fonctions de lecture de fichiers
*/

#ifndef FILESYSTEM_HPP_INCLUDED
#define FILESYSTEM_HPP_INCLUDED

#include "_trainer.hpp"


using namespace boost::filesystem;

namespace fs {
  /*!
    permet de lister les fichiers d'un répertoire
  */
  const directory_iterator end_iter;
  /*!
    \param[out] liste contiendra les chemins vers les images du dossier
    \param dossier chemin vers le dossier
  */
  void listFiles(vector<path>& liste,path dossier);
  /*!
    \param[out] pos contiendra les images intégrales des exemples positifs
    \param[out] neg contiendra les images intégrales des exemples négatifs
  */
  void load(vector<Mat>& pos,vector<Mat>&neg);
  /*!
    \param path chemin vers l'image
    \return l'image intégrale du fichier pointé par path
  */
  Mat extract(path path);

}

#endif // FILESYSTEM_HPP_INCLUDED
